<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="js/jquery-1.9.1.min.js"></script>
    <script>
        function mysub() {
            var username = jQuery("#username").val();
            var password = jQuery("#password").val();
            jQuery.getJSON("/calc/login",
                {
                    "username":username,
                    "password":password
                },
                function(result) {
                    if(result.status == 200) {
                        alert("返回结果:" + result.msg);
                    } else {
                        alert("操作失败,请重试!")
                    }
                });
        }
    </script>
</head>
<body>
    <div style="text-align: center;" >
        <h1>登录</h1>
        账号: <input id="username"><br>
        密码: <input id="password" type="password"><br>
        <input type="button" value="提交" onclick="mysub" style="margin-top: 20px;margin-left: 50px;">
    </div>
</body>
</html>